/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.hcbank.jpa.entities.helper;

import com.hcbank.classes.Account;
import com.hcbank.classes.Customer;
import com.hcbank.jpa.entities.AccountEntity;
import com.hcbank.jpa.entities.CustomerEntity;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author NHAHV
 */
public class CustomerHelper {
  public Customer toCustomer(CustomerEntity ce){
        Customer c = new Customer();
        try {
        c.setId(ce.getId());
        c.setName(ce.getName());
        c.setDateOfBirth(ce.getDateOfBirth());
        c.setNationId(ce.getNationId());
        c.setAddress(ce.getAddress());
        c.setEmail(ce.getEmail());
        c.setPhone(ce.getPhone());
        c.setPassword(ce.getPassword());
        c.setStatus(ce.getStatus());
        
      } catch (Exception e) {
          e.printStackTrace();
      } finally {
            return c;
      }
        
  }
    
    
}
